Skip to content

Conversation

@DanielMy777
Copy link
Contributor

Feature or Bugfix

  • Bugfix

Detail

Because of a bug, we cannot send an uppercase dtype parameter to the athena2pyarrow function.
This is due to the fact that this snippet happens prior to lowercasing the dtype variable -

    if dtype.startswith(("array", "struct", "map")):
        orig_dtype: str = dtype

I changed the order to make the dtype parameter lowercased before entering this condition, thus even an uppercased ARRAY/STRUCT/MAP type will initialize the orig_dtype variable and avoid the bug.

Relates

#3121

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@DanielMy777 DanielMy777 changed the title Changing dtype lowercasing to start of athena2pyarrow function fix: Changing dtype lowercasing to start of athena2pyarrow function Apr 2, 2025
@jaidisido
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
  • Commit ID: 776b3e3
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jaidisido
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
  • Commit ID: 776b3e3
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jaidisido jaidisido self-requested a review April 4, 2025 17:16
@jaidisido jaidisido merged commit 8c7646b into aws:main Apr 4, 2025
20 of 21 checks passed
@lerox
Copy link

lerox commented Jul 2, 2025

Hello there 👋. With this change my nested fields stopped working properly. Example: 'array<struct<roleType:string>>'.

It's like this old issue #2357

@jaidisido @DanielMy777

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot send uppercase array/struct/map dtype to 'athena2pyarrow' function

5 participants